package com.cloud.code.牛客网;

import java.math.BigDecimal;
import java.util.Scanner;

/**
 * HJ38 求小球落地5次后所经历的路程和第5次反弹的高度
 */
public class Test11 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        while (scanner.hasNext()){
            int high2 = scanner.nextInt();
            int i = 0;
            BigDecimal high = new BigDecimal(high2);
            BigDecimal sum = high;
            while (i<4){
                i++;

                high = high.divide(new BigDecimal(2));
                sum = sum.add(new BigDecimal(2).multiply(high)).setScale(6,BigDecimal.ROUND_HALF_UP);
            }
            System.out.println(sum);

            System.out.println(high.divide(new BigDecimal(2)).setScale(6,BigDecimal.ROUND_HALF_UP));
        }
    }
}
